API Documentation
Node.h
1 // Node.h
3 //
5 
6 namespace nkGraphics
7 {
13  class DLL_GRAPHICS_EXPORT Node : public nkExport::Exportable
14  {
15  public :
16 
17  // Position
23  virtual void setPositionRelative (const nkMaths::Vector& value) ;
29  virtual void setPositionAbsolute (const nkMaths::Vector& value) ;
35  virtual void translateRelative (const nkMaths::Vector& value) ;
41  virtual void translateAbsolute (const nkMaths::Vector& value) ;
50 
51  // Orientation
57  virtual void setOrientationRelative (const nkMaths::Quaternion& value) ;
63  virtual void setOrientationAbsolute (const nkMaths::Quaternion& value) ;
69  virtual void rotateRelative (const nkMaths::Quaternion& value) ;
75  virtual void rotateAbsolute (const nkMaths::Quaternion& value) ;
84 
85  // Scale
91  virtual void setScaleRelative (const nkMaths::Vector& value) ;
97  virtual void setScaleAbsolute (const nkMaths::Vector& value) ;
103  virtual void applyScale (const nkMaths::Vector& value) ;
112 
113  // Transformation
132 
133  // Axis
146 
147  // Hierarchy
151  Node* getParentNode () const ;
173  void addChildNode (Node* node) ;
178  Node* getChildNode (unsigned int index) const ;
182  unsigned int getNumChildNode () const ;
188  void insertIntoTreeFrom (Node* parent) ;
192  void detachFromTree () ;
193 
194  // Naming
199 
200  // Resources
204  bool getHidden () const ;
211  void setHidden (bool value) ;
212 
213  // Entity tracking
219  void addEntityToTrack (Entity* entity) ;
225  void stopEntityTracking (Entity* entity) ;
229  unsigned int getTrackedEntityCount () const ;
234  Entity* getTrackedEntity (unsigned int index) const ;
235 
236  // Listeners
249 
250  // Import / Export
256  virtual void exportClassToTree (nkExport::Node* rootNode) override ;
262  virtual void importClassFromTree (nkExport::Node* rootNode) override ;
263  } ;
264 }
nkGraphics::Node::unregisterListener
void unregisterListener(NodeChangeListener *listener)
nkGraphics::Node::setScaleAbsolute
virtual void setScaleAbsolute(const nkMaths::Vector &value)
nkGraphics::Node::setHidden
void setHidden(bool value)
nkGraphics::Node::getParentNode
Node * getParentNode() const
nkGraphics::Node::getOrientationAbsolute
nkMaths::Quaternion getOrientationAbsolute()
nkExport::Exportable
An interface to define objects that can be exported using this component.
Definition: Exportable.h:15
nkGraphics::Node::getAbsoluteUp
nkMaths::Vector getAbsoluteUp()
nkMaths::Quaternion
A quaternion, symbolizing rotations as a 4D vector.
Definition: Quaternion.h:14
nkGraphics::Node::importClassFromTree
virtual void importClassFromTree(nkExport::Node *rootNode) override
nkGraphics::Node::stopEntityTracking
void stopEntityTracking(Entity *entity)
nkGraphics::Node::getScaleAbsolute
nkMaths::Vector getScaleAbsolute()
nkGraphics::Node::getName
nkMemory::StringView getName() const
nkMaths::Matrix
Represents a 4x4 float matrix.
Definition: Matrix.h:14
nkGraphics::Node::translateRelative
virtual void translateRelative(const nkMaths::Vector &value)
nkGraphics::Node::setOrientationAbsolute
virtual void setOrientationAbsolute(const nkMaths::Quaternion &value)
nkGraphics::Node::getTrackedEntity
Entity * getTrackedEntity(unsigned int index) const
nkGraphics::Node::setOrientationRelative
virtual void setOrientationRelative(const nkMaths::Quaternion &value)
nkGraphics::Node::getOrientationRelative
nkMaths::Quaternion getOrientationRelative() const
nkGraphics::Node::detachFromTree
void detachFromTree()
nkGraphics::Node::translateAbsolute
virtual void translateAbsolute(const nkMaths::Vector &value)
nkGraphics::Entity
An entity in a render queue. It drives the shader and possible graph position for a set of renderable...
Definition: Entity.h:15
nkGraphics::Node::getPositionAbsolute
nkMaths::Vector getPositionAbsolute()
nkGraphics::Node::getLocalTransform
nkMaths::Matrix getLocalTransform()
nkGraphics::Node::getAbsoluteRight
nkMaths::Vector getAbsoluteRight()
nkGraphics::Node::exportClassToTree
virtual void exportClassToTree(nkExport::Node *rootNode) override
nkGraphics::Node::addEntityToTrack
void addEntityToTrack(Entity *entity)
nkExport::Node
A node in the tree structure representing the data to export / import.
Definition: Node.h:42
nkGraphics::Node::getTrackedEntityCount
unsigned int getTrackedEntityCount() const
nkGraphics::Node::insertIntoTreeFrom
void insertIntoTreeFrom(Node *parent)
nkGraphics::Node::applyScale
virtual void applyScale(const nkMaths::Vector &value)
nkGraphics::Node::getPositionRelative
nkMaths::Vector getPositionRelative() const
nkGraphics::Node::addChildNode
Node * addChildNode(const nkMemory::StringView &name)
nkGraphics::Node::dispatchDirtyTransform
void dispatchDirtyTransform()
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkGraphics::Node::getAbsoluteFront
nkMaths::Vector getAbsoluteFront()
nkGraphics::Node::getHidden
bool getHidden() const
nkGraphics::Node::rotateAbsolute
virtual void rotateAbsolute(const nkMaths::Quaternion &value)
nkGraphics::Node::setPositionAbsolute
virtual void setPositionAbsolute(const nkMaths::Vector &value)
nkGraphics::Node::addChildNode
void addChildNode(Node *node)
nkGraphics::Node::registerListener
void registerListener(NodeChangeListener *listener)
nkGraphics::Node::updateTransformations
void updateTransformations()
nkGraphics::Node
Represents a node in a scene graph.
Definition: Node.h:14
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::Node::setScaleRelative
virtual void setScaleRelative(const nkMaths::Vector &value)
nkGraphics::Node::getChildNode
Node * getChildNode(unsigned int index) const
nkMaths::Vector
A 4-component vector class, with floats.
Definition: Vector.h:12
nkGraphics::Node::setPositionRelative
virtual void setPositionRelative(const nkMaths::Vector &value)
nkGraphics::Node::rotateRelative
virtual void rotateRelative(const nkMaths::Quaternion &value)
nkGraphics::NodeChangeListener
A base class for a listener for node changes.
Definition: NodeChangeListener.h:12
nkGraphics::Node::addChildNode
Node * addChildNode()
nkGraphics::Node::getNumChildNode
unsigned int getNumChildNode() const
nkGraphics::Node::getAbsoluteTransform
nkMaths::Matrix getAbsoluteTransform()
nkGraphics::Node::getScaleRelative
nkMaths::Vector getScaleRelative() const